package com.jar.exercise.设计模式.visitor模式.user;

import com.jar.exercise.设计模式.visitor模式.visitor.Visitor;

import java.math.BigDecimal;

public class Student extends User {
    public Student(String name, String className, String identity) {
        super(name, className, identity);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visitor(this);
    }

    // 升学率
    public BigDecimal rank() {
        return BigDecimal.valueOf(Math.random()).setScale(2,4);
    }

}